import request from '@/router/axios';
import {baseUrl} from '@/config/env';

export const getList = (page, limit, params) => {
  return request({
    url: baseUrl + '/api/MisLogisticsPakHead/getpages',
    method: 'get',
    params: {
      key:params.orderNumber==undefined?'':params.orderNumber,
      type:params.remark2==undefined?'':params.remark2,
      time:params.releaseDate1==undefined?'':params.releaseDate1.join('_'),
      page,
      limit,
    }
  })
}

export const getDetail = (page, limit, params) => {
  return request({
    url: baseUrl + '/api/MisLogisticsPakHead/getpagesdetail',
    method: 'get',
    params: {
      type:params.orderNumber==undefined?'':params.orderNumber,
      page,
      limit,
    }
  })
}

export const edit = (row) => {
  return request({
    url: baseUrl + '/api/MisLogisticsPakHead/edit',
    method: 'post',
    data: row
  })
}

export const editDetial = (row) => {
  return request({
    url: baseUrl + '/api/MisLogisticsPakHead/editDetial',
    method: 'post',
    data: row
  })
}
